Brain-Computer Interface Based Robotic Arm Self-Assisting System and Method

ABSTRACT

Disclosed are a brain-computer interface based robotic arm self-assisting system and method. The system comprises a sensing layer, a decision-making layer and an execution layer. The sensing layer comprises an electroencephalogram acquisition and detection module and a visual identification and positioning module and is used for analyzing and identifying the intent of a user and identifying and locating positions of a corresponding cup and the user&#39;s mouth based on the user intent. The execution layer comprises a robotic arm control module that performs trajectory planning and control for a robotic arm based on an execution instruction received from a decision-making module. The decision-making layer comprises the decision-making module that is connected to the electroencephalogram acquisition and detection module, the visual identification and positioning module and the robotic arm control module to implement the acquisition and transmission of data of an electroencephalogram signal, a located position and a robotic arm status and the sending of the execution instruction for the robotic arm. The system combines the visual identification and positioning technology, a brain-computer interface and a robotic arm to facilitate paralyzed patients to drink water by themselves, improving the quality of life of the paralyzed patients.

TECHNICAL FIELD

The present invention relates to the field of brain-computer interfaceapplication research, and in particular relates to a brain-computerinterface based robotic arm self-assisting system and method.

BACKGROUND ART

There are many seriously paralyzed patients in the world who can only dosome of the activities necessary for daily life, such as drinking water,by getting help from others. With the continuous development of theartificial intelligence and robot technology, and more and more researchfindings have been applied to assist such people in order to improvetheir quality of life, in which the field of Brain Computer Interface(BCI), as one branch of the field of neural engineering, is developingrapidly and has a wide prospect, which has aroused people's researchupsurge in the field of brain-computer interface.

Brain-computer interface (BCI) is a new human-machine interactiontechnique that enables direct communication between a human brain and acomputer without the conventional brain output pathway (peripheralnerves and muscle tissues), providing paralyzed patients with a new wayto exchange and control information with the outside world. The BCIsystem may be an invasive system or a non-invasive system, the invasivesystem will implant electrodes into the skull, and the non-invasivesystem will only collect scalp electroencephalogram signals. Since thenon-invasive brain-computer interface has no need for surgery and issafer and simpler than an invasive system. With the continuousimprovement of signal processing methods and techniques, the processingof scalp electroencephalogram (EGG) has reached a certain level, so thatit is possible for the brain-computer interface to come into practicalapplication in life. The present invention uses a non-invasivebrain-computer interface technique.

At present, some existing researches have attempted to combine thebrain-computer interface technique with a robot technique. In theChinese patent application with the publication number CN 102198660 A,entitled “A brain-machine interface based robotic arm control system andaction command control scheme (

)”, in which a brain-computer interface based on motor imagery realizescontrol by eight commands, including moving up, moving down, movingleft, moving right, moving forward, moving backward, finger grasp andfinger release, of the robotic aim. The Chinese patent application withthe publication number CN 102309365 A, entitled “A wearablebrain-controlled intelligent prosthesis (

)”, realizes wearable detection and calculation for electroencephalogramdetection and identification, and combines with the intelligent sensingtechnique to achieve precise adaptive intelligent control for aprosthesis, so as to improve the efficiency and accuracy of movement ofthe prosthesis and ideally implement the functions of a human hand Inthe Chinese invention patent with the publication number CN 105425963 A,entitled “A system of electroencephalogram-controlled robotic aim (

)”, electroencephalogram signals are used to acquire parameters ofattention and relaxation to implement preset movements of a robotic aim.

In the invention patents described above, only some simple or evenpreset robotic aim movement controls are implemented throughelectroencephalogram signals, which does not take full use of thefeatures and advantages of the combination of the brain-computerinterface and the robotic aim self-determination control technique. Thebrain-computer interface based robotic aim self-assisting system andmethod can combine the advantages of both the brain-computer interfaceand the robotic aim, and better utilize the brain-computer interface toimprove the quality of life of paralyzed patients and improve theirability to live independently.

SUMMARY OF THE INVENTION

In view of the above deficiencies of the prior art, an object of thepresent invention is to provide a brain-computer interface based roboticarm self-assisting system.

Another object of the present invention is to provide a brain-computerinterface based robotic arm self-assisting method.

The object of the present invention can be achieved by the followingtechnical solution:

a brain-computer interface based robotic arm self-assisting system,which is set up based on a three-layer structure including a sensinglayer, a decision-making layer and an execution layer, wherein thesensing layer comprises an electroencephalogram acquisition anddetection module and a visual identification and positioning module, theelectroencephalogram acquisition and detection module being used foracquiring an electroencephalogram signal and analyzing and identifyingthe intent of a user, and the visual identification and positioningmodule being used for identifying and locating positions of acorresponding cup and the user's mouth based on the user intent; theexecution layer comprises a robotic arm control module, which is acarrier assisting in operation of a person in practice and performstrajectory planning and control for a robotic arm based on an executioninstruction received from a decision-making module; and thedecision-making layer comprises a decision-making module, which isconnected to the electroencephalogram acquisition and detection module,the visual identification and positioning module and the robotic armcontrol module to implement acquisition and transmission of data, suchas an electroencephalogram signal, a located position and a robotic armstatus, and the sending of the execution instruction for the roboticarm.

Preferably, the electroencephalogram acquisition and detection modulecomprises an electrode cap for electroencephalogram acquisition, anelectroencephalogram acquisition device and a first computer, whereinten channels of “A1”, “T5”, “P3”, “PZ”, “P4”, “T6”, “O1”, “Oz”, “O2” and“A2” in the electrode cap are used and disposed at positions accordingto an international standard 10-20 system; and the first computer isused to implement P300 signal detection and a flickering visualstimulation of a function key in the screen, and the function keys forthe flickering visual stimulation are regularly distributed in a 2*2array in the computer screen, including function keys of “cup1”, “cup2”,“cup3” and “back”, and flicker at an interval of 200 ms with change inblack and green colors in a random sequence.

Preferably, the visual identification and positioning module comprisestwo Microsoft Kinect vision sensors and a second computer, wherein thetwo Microsoft Kinect vision sensors are respectively disposed in frontof a cup to be taken and in front of a user for identification andpositioning of the cup to be taken and the user's mouth; and the secondcomputer is used to implement a cup contour detection algorithm, a cuppositioning algorithm, a template matching and identification algorithm,and a mouth identification and positioning algorithm

Preferably, the decision-making module implements, based on a TCPcommunication protocol, acquisition and transmission of data of anelectroencephalogram intent, a located position and a robotic arm statusand the sending of an execution instruction for the robotic arm bydefining unified transmission data variables, including a user'selectroencephalogram intent and the information of positions of the cupand the mouth and setting up a service code framework for a client and aserver.

Preferably, the robotic arm control module uses amulti-degree-of-freedom robotic arm as an effector.

Another object of the present invention can be achieved by the followingtechnical solution:

a brain-computer interface based robotic arm self-assisting method,comprising the steps as follows:

1) a user is sitting in front of a screen of a first computer, adjuststhe position thereof, wears an electrode cap for electroencephalogramacquisition, opens an electroencephalogram acquisition device and thefirst computer, and confirms that the signal acquisition status is good;

2) a brain-computer interface based robotic arm self-assisting system isstarted to confirm that the Microsoft Kinect vision sensor used foridentifying and locating the user's mouth can correctly capture theuser's mouth, and confirm that three preset cups to be taken arecorrectly placed in the field of view of the Microsoft Kinect visionsensor used for identifying and locating the cups to be taken;

3) the screen of the first computer enters a function key interface offlickering visual stimulation, the function key interface comprisingfour function keys of “cup1”, “cup2”, “cup3” and “back”;

4) the user gazes at one of the three function keys “cup1”, “cup2” or“cup3”, that is, selecting one of the three preset cups, and once thefunction key is selected, the electroencephalogram intent of the userabout the selection of the cup is obtained and sent to the visualidentification and positioning module and the decision-making module;

5) the visual identification and positioning module identifies andlocates the position of the corresponding cup and the position of theuser's mouth based on the electroencephalogram intent in the step 4) andsends, based on the TCP communication protocol, the information of thepositions of the cup selected by the user and the user's mouth to thedecision-making module;

6) the decision-making module generates a corresponding executioninstruction for the robotic arm based on the information of thepositions of the cup and the user's mouth obtained in the step 5) andthe electroencephalogram intent obtained in the step 4), and sends thecorresponding execution instruction for the robotic arm to the roboticarm control module;

7) the robotic arm control module performs trajectory planning based onthe execution instruction for the robotic arm and controls, based on theplanned trajectory, the robotic arm to take the cup selected by the userand transfer the cup to the user's mouth;

8) after drinking water, the user gazes at the function key “back”, andonce the function key is selected, the user's electroencephalogramintent about returning the cup will be obtained and sent to thedecision-making module;

9) the decision-making module generates, based on theelectroencephalogram intent for returning the cup obtained in the step8), a corresponding execution instruction for the robotic arm and sendsexecution instruction for the robotic arm to the robotic arm controlmodule; and 10) the robotic arm control module performs trajectoryplanning based on the execution instruction for the robotic arm andcontrols, based on the planned trajectory, the robotic arm to return thecup selected by the user to the original position and restore theinitial position status of the robotic arm, so as to realize theself-assisting function of the robotic arm for assisting the user todrink water.

Preferably, selecting the function keys in the steps 4) and 8) isspecifically implemented by the following process: the user gazes at acertain function key in the function key interface of the firstcomputer, the electroencephalogram signal is acquired, amplified,filtered and processed by analog-to-digital conversion through anelectrode cap and an electroencephalogram acquisition device, then thedata is transferred to the first computer for P300 signal detection, andthen the selection of the certain function key is implemented, the P300signal detection being specifically implemented by the steps of:

(I) processing the EEG signal by 0.1-20 Hz bandpass filtering and noisereduction; and

(II) intercepting, with the amplitude of the EEG signal as a feature,data of a time window of 600 ms after a P300 function key flickers, andperforming status classification using a Bayesian model, therebyrealizing the P300 signal detection.

Preferably, in the step 5), identifying and locating the position of thecorresponding cup is specifically implemented by the steps of:

(1) extracting the horizontal plane in which the cup is placed in thethree-dimensional point cloud of the Microsoft Kinect vision sensorthrough a region growing algorithm;

(2) removing the horizontal plane extracted in the step (1), andperforming extraction and segmentation for the object from the remainingthree-dimensional point cloud;

(3) respectively matching, using a template matching algorithm, thecolor image corresponding to each object point cloud set obtained in thestep (2) with preset images in a library to identify the point cloud setcorresponding to the cup selected by the user; and

(4) performing average calculation for the point cloud set correspondingto the selected cup obtained in the step (3) so that the positioning forthe cup in a coordinate system of the Microsoft Kinect vision sensor isimplemented and converted into the positioning in a robotic armcoordinate system.

Preferably, in the step 5), identifying and locating the position of theuser's mouth is specifically implemented by the steps of: performinghuman body detection using a software development kit provided by theMicrosoft Kinect vision sensor itself so that a coordinate position ofthe user's mouth in a coordinate system of the Microsoft Kinect visionsensor is acquired and converted into coordinate positions in a roboticarm coordinate system.

Preferably, in the steps 7) and 10), performing trajectory planning andcontrol for the robotic arm is specifically implemented by the processof: combining preset key trajectory points with coordinate points of theuser's mouth and the selected cup in the robotic arm coordinate systemto plan an operation trajectory of the robotic arm, and calling thecorresponding API of the robotic arm to control the robotic arm tooperate based on the planned trajectory, so as to realize theself-assisting function of the robotic arm for assisting the user todrink water.

As compared with the prior art, the present invention has the followingadvantages and beneficial effects:

1. In the present invention, based on the combination of the P300-basedbrain-computer interface technique and the assisting technique of arobotic arm with a self-controlled decision-making function, a user onlyneeds to provide an electroencephalogram intent, and the rest, i.e., thecontrol on the movement of a robotic arm, is implemented by theautomatic planning and control of the system, thereby having a smallburden on the user and being convenient for application.

2. The present invention combines the visual identification andpositioning technology, a brain-computer interface and a robotic arm torealize the effect that a drink selected by a user can be placedanywhere in a certain range.

3. The present invention combines the visual identification andpositioning technology, a brain-computer interface and a robotic arm tocomprehensively utilize their advantages. Users can select a drink bythemselves through the brain-computer interface in the system of thepresent invention, and then through the robotic arm in the presentinvention system and the visual identification and positioningtechnique, the drink selected by the user is positioned, identified,taken and carried to the user's mouth, so as to facilitate paralyzedpatients to drink water by themselves, thereby improving the quality oflife of the paralyzed patients and improving their ability to liveindependently.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural block diagram of a brain-computer interface basedrobotic arm self-assisting system according to the present invention.

FIG. 2 is a flow chart of a brain-computer interface based robotic armself-assisting system according to the present invention.

FIG. 3 is a flow chart of identifying and locating the position of acorresponding cup according to the present invention.

FIG. 4 is a schematic diagram of trajectory planning and control for arobotic arm according to the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

Hereafter the present invention will be further described in detail inconjunction with embodiments and accompanying drawings, but theembodiments of the present invention are not limited thereto.

Embodiment 1:

As shown in FIG. 1, this embodiment provides a brain-computer interfacebased robotic arm self-assisting system, which is set up based on athree-layer structure including a sensing layer, a decision-making layerand an execution layer, wherein the sensing layer comprises anelectroencephalogram acquisition and detection module and a visualidentification and positioning module, the electroencephalogramacquisition and detection module being used for acquiring anelectroencephalogram signal and analyzing and identifying the intent ofa user, and the visual identification and positioning module being usedfor identifying and locating positions of a corresponding cup and theuser's mouth based on the user intent; the execution layer comprises arobotic arm control module, which is a carrier assisting in operation ofa person in practice and performs trajectory planning and control for arobotic arm based on an execution instruction received from adecision-making module; and the decision-making layer comprises adecision-making module, which is connected to the electroencephalogramacquisition and detection module, the visual identification andpositioning module and the robotic arm control module to implementacquisition and transmission of data, such as an electroencephalogramsignal, a located position and a robotic arm status, and the sending ofthe execution instruction for the robotic arm.

The electroencephalogram acquisition and detection module comprises anelectrode cap for electroencephalogram acquisition, anelectroencephalogram acquisition device and a first computer, whereinten channels of “A1”, “T5”, “P3”, “PZ”, “P4”, “T6”, “O1”, “Oz”, “O2” and“A2” in the electrode cap are used and disposed at positions accordingto an international standard 10-20 system; and the first computer isused to implement P300 signal detection and a flickering visualstimulation of a function key in the screen, and the function keys forthe flickering visual stimulation are regularly distributed in a 2*2array in the computer screen, including function keys of “cup1”, “cup2”,“cup3” and “back”, and flicker at an interval of 200 ms with change inblack and green colors in a random sequence.

The visual identification and positioning module comprises two MicrosoftKinect vision sensors and a second computer, wherein the two MicrosoftKinect vision sensors are respectively disposed in front of a cup to betaken and in front of a user for identification and positioning of thecup to be taken and the user's mouth; and the second computer is used toimplement a cup contour detection algorithm, a cup positioningalgorithm, a template matching and identification algorithm, and a mouthidentification and positioning algorithm.

The decision-making module implements, based on a TCP communicationprotocol, acquisition and transmission of data of anelectroencephalogram intent, a located position and a robotic arm statusand the sending of an execution instruction for the robotic arm bydefining unified transmission data variables, including a user'selectroencephalogram intent and the information of positions of the cupand the mouth and setting up a service code framework for a client and aserver.

The robotic arm control module uses a multi-degree-of-freedom roboticarm as an effector.

Embodiment 2

this embodiment provides a brain-computer interface based robotic armself-assisting method, as shown in FIG. 2, the method comprising thesteps as follows:

1) a user is sitting in front of a screen of a first computer, adjuststhe position thereof, wears an electrode cap for electroencephalogramacquisition, opens an electroencephalogram acquisition device and thefirst computer, and confirms that the signal acquisition status is good;

2) a brain-computer interface based robotic arm self-assisting system isstarted to confirm that the Microsoft Kinect vision sensor used foridentifying and locating the user's mouth can correctly capture theuser's mouth, and confirm that three preset cups to be taken arecorrectly placed in the field of view of the Microsoft Kinect visionsensor used for identifying and locating the cups to be taken;

3) the screen of the first computer enters a function key interface offlickering visual stimulation, the function key interface comprisingfour function keys of “cup1”, “cup2”, “cup3” and “back”;

4) the user gazes at one of the three function keys “cup1”, “cup2” or“cup3”, that is, selecting one of the three preset cups, and once thefunction key is selected, the electroencephalogram intent of the userabout the selection of the cup is obtained and sent to the visualidentification and positioning module and the decision-making module;

5) the visual identification and positioning module identifies andlocates the position of the corresponding cup and the position of theuser's mouth based on the electroencephalogram intent in the step 4) andsends, based on the TCP communication protocol, the information of thepositions of the cup selected by the user and the user's mouth to thedecision-making module;

6) the decision-making module generates a corresponding executioninstruction for the robotic arm based on the information of thepositions of the cup and the user's mouth obtained in the step 5) andthe electroencephalogram intent obtained in the step 4), and sends thecorresponding execution instruction for the robotic arm to the roboticarm control module;

7) the robotic arm control module performs trajectory planning based onthe execution instruction for the robotic arm and controls, based on theplanned trajectory, the robotic arm to take the cup selected by the userand transfer the cup to the user's mouth;

8) after drinking water, the user gazes at the function key “back”, andonce the function key is selected, the user's electroencephalogramintent about returning the cup will be obtained and sent to thedecision-making module;

9) the decision-making module generates, based on theelectroencephalogram intent for returning the cup obtained in the step8), a corresponding execution instruction for the robotic arm and sendsexecution instruction for the robotic arm to the robotic arm controlmodule; and

10) the robotic arm control module performs trajectory planning based onthe execution instruction for the robotic arm and controls, based on theplanned trajectory, the robotic arm to return the cup selected by theuser to the original position and restore the initial position status ofthe robotic arm, so as to realize the self-assisting function of therobotic arm for assisting the user to drink water.

Selecting the function keys in the steps 4) and 8) is specificallyimplemented by the following process: the user gazes at a certainfunction key in the function key interface of the first computer, theelectroencephalogram signal is acquired, amplified, filtered andprocessed by analog-to-digital conversion through an electrode cap andan electroencephalogram acquisition device, then the data is transferredto the first computer for P300 signal detection, and then the selectionof the certain function key is implemented, the P300 signal detectionbeing specifically implemented by the steps of:

(I) processing the EEG signal by 0.1-20 Hz bandpass filtering and noisereduction; and

(II) intercepting, with the amplitude of the EEG signal as a feature,data of a time window of 600 ms after a P300 function key flickers, andperforming status classification using a Bayesian model, therebyrealizing the P300 signal detection.

In the step 5), as shown in FIG. 3, identifying and locating theposition of the corresponding cup is specifically implemented by thesteps of:

(1) extracting the horizontal plane in which the cup is placed in thethree-dimensional point cloud of the Microsoft Kinect vision sensorthrough a region growing algorithm;

(2) removing the horizontal plane extracted in the step (1), andperforming extraction and segmentation for the object from the remainingthree-dimensional point cloud;

(3) respectively matching, using a template matching algorithm, thecolor image corresponding to each object point cloud set obtained in thestep (2) with preset images in a library to identify the point cloud setcorresponding to the cup selected by the user; and

(4) performing average calculation for the point cloud set correspondingto the selected cup obtained in the step (3) so that the positioning forthe cup in a coordinate system of the Microsoft Kinect vision sensor isimplemented and converted into the positioning in a robotic armcoordinate system.

In the step 5), identifying and locating the position of the user'smouth is specifically implemented by the steps of: performing human bodydetection using a software development kit provided by the MicrosoftKinect vision sensor itself so that a coordinate position of the user'smouth in a coordinate system of the Microsoft Kinect vision sensor isacquired and converted into coordinate positions in a robotic armcoordinate system.

In the steps 7) and 10), as shown in FIG. 4, the trajectory planning andcontrol for the robotic arm is specifically implemented by the processof: combining preset key trajectory points with coordinate points of theuser's mouth and the selected cup in the robotic arm coordinate systemto plan an operation trajectory of the robotic arm, and calling thecorresponding API of the robotic arm to control the robotic arm tooperate based on the planned trajectory, so as to realize theself-assisting function of the robotic arm for assisting the user todrink water.

The above description is merely of preferred embodiments of the presentinvention, but the scope of protection of the present invention is notlimited thereto, and any equivalent replacement or variation that can beachieved by a person skilled in the art according to the technicalsolutions of the present invention patent and the inventive conceptthereof in the scope disclosed by the present invention should fallwithin the scope of protection of the present invention.

1. A brain-computer interface based robotic arm self-assisting system, characterized in that the system is set up based on a three-layer structure including a sensing layer, a decision-making layer and an execution layer, wherein the sensing layer comprises an electroencephalogram acquisition and detection module and a visual identification and positioning module, the electroencephalogram acquisition and detection module being used for acquiring an electroencephalogram signal and analyzing and identifying the intent of a user, and the visual identification and positioning module being used for identifying and locating positions of a corresponding cup and the user's mouth based on the user intent; the execution layer comprises a robotic arm control module, which is a carrier assisting in operation of a person in practice and performs trajectory planning and control for a robotic arm based on an execution instruction received from a decision-making module; and the decision-making layer comprises a decision-making module, which is connected to the electroencephalogram acquisition and detection module, the visual identification and positioning module and the robotic arm control module to implement acquisition and transmission of data of an electroencephalogram signal, a located position and a robotic arm status and the sending of the execution instruction for the robotic arm.
 2. The brain-computer interface based robotic arm self-assisting system according to claim 1, characterized in that the electroencephalogram acquisition and detection module comprises an electrode cap for electroencephalogram acquisition, an electroencephalogram acquisition device and a first computer, wherein ten channels of “A1”, “T5”, “P3”, “PZ”, “P4”, “T6”, “O1”, “Oz”, “O2” and “A2” in the electrode cap are used and disposed at positions according to an international standard 10-20 system; and the first computer is used to implement P300 signal detection and a flickering visual stimulation of a function key in the screen, and the function keys for the flickering visual stimulation are regularly distributed in a 2*2 array in the computer screen, including function keys of “cup1”, “cup2”, “cup3” and “back”, and flicker at an interval of 200 ms with change in black and green colors in a random sequence.
 3. The brain-computer interface based robotic arm self-assisting system according to claim 1, characterized in that the visual identification and positioning module comprises two Microsoft Kinect vision sensors and a second computer, wherein the two Microsoft Kinect vision sensors are respectively disposed in front of a cup to be taken and in front of a user for identification and positioning of the cup to be taken and the user's mouth; and the second computer is used to implement a cup contour detection algorithm, a cup positioning algorithm, a template matching and identification algorithm, and a mouth identification and positioning algorithm.
 4. The brain-computer interface based robotic arm self-assisting system according to claim 1, characterized in that the decision-making module implements, based on a TCP communication protocol, acquisition and transmission of data of an electroencephalogram intent, a located position and a robotic arm status and the sending of the execution instruction for the robotic arm, by defining unified transmission data variables, including a user's electroencephalogram intent and the information of positions of the cup and the mouth and setting up a service code framework for a client and a server.
 5. The brain-computer interface based robotic arm self-assisting system according to claim 1, characterized in that the robotic arm control module uses a multi-degree-of-freedom robotic arm as an effector.
 6. A brain-computer interface based robotic arm self-assisting method, characterized in that the method comprises the steps as follows: 1) a user is sitting in front of a screen of a first computer, adjusts the position thereof, wears an electrode cap for electroencephalogram acquisition, opens an electroencephalogram acquisition device and the first computer, and confirms that the signal acquisition status is good; 2) a brain-computer interface based robotic arm self-assisting system is started to confirm that the Microsoft Kinect vision sensor used for identifying and locating the user's mouth can correctly capture the user's mouth, and confirm that three preset cups to be taken are correctly placed in the field of view of the Microsoft Kinect vision sensor used for identifying and locating the cups to be taken; 3) the screen of the first computer enters a function key interface of flickering visual stimulation, the function key interface comprising four function keys of “cup1”, “cup2”, “cup3” and “back”; 4) the user gazes at one of the three function keys “cup1”, “cup2” or “cup3”, that is, selecting one of the three preset cups, and once the function key is selected, the electroencephalogram intent of the user about the selection of the cup is obtained and sent to the visual identification and positioning module and the decision-making module; 5) the visual identification and positioning module identifies and locates the position of the corresponding cup and the position of the user's mouth based on the electroencephalogram intent in the step 4) and sends, based on the TCP communication protocol, the information of the positions of the cup selected by the user and the user's mouth to the decision-making module; 6) the decision-making module generates a corresponding execution instruction for the robotic arm based on the information of the positions of the cup and the user's mouth obtained in the step 5) and the electroencephalogram intent obtained in the step 4), and sends the corresponding execution instruction for the robotic arm to the robotic arm control module; 7) the robotic arm control module performs trajectory planning based on the execution instruction for the robotic arm and controls, based on the planned trajectory, the robotic arm to take the cup selected by the user and transfer the cup to the user's mouth; 8) after drinking water, the user gazes at the function key “back”, and once the function key is selected, the user's electroencephalogram intent about returning the cup will be obtained and sent to the decision-making module; 9) the decision-making module generates, based on the electroencephalogram intent for returning the cup obtained in the step 8), a corresponding execution instruction for the robotic arm and sends execution instruction for the robotic arm to the robotic arm control module; and 10) the robotic arm control module performs trajectory planning based on the execution instruction for the robotic arm and controls, based on the planned trajectory, the robotic arm to return the cup selected by the user to the original position and restore the initial position status of the robotic arm, so as to realize the self-assisting function of the robotic arm for assisting the user to drink water.
 7. The brain-computer interface based robotic arm self-assisting method according to claim 6, characterized in that selecting the function keys in the steps 4) and 8) is specifically implemented by the following process: the user gazes at a certain function key in the function key interface of the first computer, the electroencephalogram signal is acquired, amplified, filtered and processed by analog-to-digital conversion through an electrode cap and an electroencephalogram acquisition device, then the data is transferred to the first computer for P300 signal detection, and then the selection of the certain function key is implemented, the P300 signal detection being specifically implemented by the steps of: (I) processing the EEG signal by 0.1-20 Hz bandpass filtering and noise reduction; and (II) intercepting, with the amplitude of the EEG signal as a feature, data of a time window of 600 ms after a P300 function key flickers, and performing status classification using a Bayesian model, thereby realizing the P300 signal detection.
 8. The brain-computer interface based robotic arm self-assisting method according to claim 6, characterized in that in the step 5), identifying and locating the position of the corresponding cup is specifically implemented by the steps of: (1) extracting the horizontal plane in which the cup is placed in the three-dimensional point cloud of the Microsoft Kinect vision sensor through a region growing algorithm; (2) removing the horizontal plane extracted in the step (1), and performing extraction and segmentation for the object from the remaining three-dimensional point cloud; (3) respectively matching, using a template matching algorithm, the color image corresponding to each object point cloud set obtained in the step (2) with preset images in a library to identify the point cloud set corresponding to the cup selected by the user; and (4) performing average calculation for the point cloud set corresponding to the selected cup obtained in the step (3) so that the positioning for the cup in a coordinate system of the Microsoft Kinect vision sensor is implemented and converted into the positioning in a robotic arm coordinate system.
 9. The brain-computer interface based robotic arm self-assisting method according to claim 6, characterized in that in the step 5), identifying and locating the position of the user's mouth is specifically implemented by the steps of: performing human body detection using a software development kit provided by the Microsoft Kinect vision sensor itself so that a coordinate position of the user's mouth in a coordinate system of the Microsoft Kinect vision sensor is acquired and converted into coordinate positions in a robotic arm coordinate system.
 10. The brain-computer interface based robotic arm self-assisting method according to claim 6, characterized in that in the steps 7) and 10), performing trajectory planning and control for the robotic arm is specifically implemented by: combining preset key trajectory points with coordinate points of the user's mouth and the selected cup in the robotic arm coordinate system to plan an operation trajectory of the robotic arm, and calling the corresponding API of the robotic arm to control the robotic arm to operate based on the planned trajectory, so as to realize the self-assisting function of the robotic arm for assisting the user to drink water. 